/******************************************************************************
 * 【本类功能概述】                                 					      *
 *  版权所有（C）2017-20XX，米兔网络                                         *
 *  保留所有权利。                                                            *
 ******************************************************************************
 *  作者 : <Jiang Jiang>
 *****************************************************************************/
 
using UnityEngine;
using System.Collections.Generic;
using System;
using CodeStage.AntiCheat.ObscuredTypes;
using Util;
namespace CSV
{
//ReservedTextName
public class defaultclass
{
	private volatile static CSVReader _instance = null;
    private static readonly object lockHelper = new object();
//TheReservedText
	public class line
    {
//TheReservedValueText
    }

    private static Dictionary<string, line> m_datadic = new Dictionary<string, line>();
    public static line getline(string id)
    {
        line _line;
        m_datadic.TryGetValue(id, out _line);
        if (_line == null)
        {
            _line = new line();
//TheReservedInitializeText

			var soleId = _instance.getById(id, _instance.m_keys[0]);
            if (!soleId.Equals("-1"))
            {
                m_datadic.Add(id, _line);
            }
        }
		return _line;
    }
	public static line getline(int id)
    {
        return getline(id.toString());
    }
	
	public static CSVReader Instance()
	{
        if(_instance == null)
        {
            lock(lockHelper)
            {
                if(_instance == null)
                     _instance = DataTablesManager.GetCsvData("defaultclass");
            }
        }
        return _instance;
    }
    
    public static CSVReader NewInstance()
	{
        m_datadic.Clear();
        _instance = new CSVReader("defaultclass");
        return _instance;
    }
}
}